﻿using System;
using System.ComponentModel;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Moonwish.Core.ModelBase
{
    /// <summary>
    /// Model基类，by zhlin 2012-03-10。
    /// </summary>
    public abstract class ModelBase
    {
        public event AsyncCompletedEventHandler QueryCompleted;

        public abstract void QueryAsync(Request request);

        protected void InvokeQueryCompleted()
        {
            if (QueryCompleted != null)
            {
                QueryCompleted(this, new AsyncCompletedEventArgs(null, false, null));
            }
        }

        protected void InvokeQueryCompleted(object sender, AsyncCompletedEventArgs e)
        {
            if (QueryCompleted != null)
            {
                QueryCompleted(sender, e);
            }
        }
    }
}
